<?php

namespace App\Model;

use App\Common\Model\ShopAccount;
use App\Common\Model\MainBaseModel;

class User extends MainBaseModel
{
    protected $table = 'shop_accounts';

    //查询直推者名字
    public function getPuidName(){
        return self::hasOne(ShopAccount::class,'uid','p_uid')->withDefault([
                'name'=>'未知'
        ]);
    }

}
